Method and apparatus for content based switching

ABSTRACT

Various embodiments are described for performing pattern matching for content based switching. In one embodiment, an apparatus may include a document parser and a pattern parser. The document parser may be arranged to parse a document having transaction information and to create a document object from the transaction information. The pattern parser may be arranged to parse pattern information of a pattern for one or more elements according to a predefined pattern object data structure and to place the elements in appropriate blocks within the pattern object data structure. Other embodiments are described and claimed.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.09/927,255 filed on Aug. 10, 2001 which issued as U.S. Pat. No.7,096,270 on Aug. 22, 2006; which is a Continuation-In-Part of U.S.patent application Ser. No. 09/549,041 filed on Apr. 13, 2000 whichissued as U.S. Pat. No. 6,732,175 on May 4, 2004.

BACKGROUND

Content based switching provides a way to offer different classes ofservice based on the content of a document. Content based switchingoperates to direct the document to a different network node based oninformation stored in the document. This may provide a way to tailorservices to a particular document. For example, assume a data centercomprises server A and server B, with server A providing information oncats and server B providing information on dogs. Content based switchingtechnology may examine a document for the word “cat” or “dog,” and routethe document to server A or server B accordingly.

As with many network systems, content based switching may introduce somedelay into a system. The amount of delay tolerated by a particularsystem may vary based upon various design goals. The delay introduce bycontent based switching may also vary depending on a number of factors.For example, a document may be relatively large. The larger thedocument, the more time it may take to search the document for aparticular set of information, referred to herein as a pattern.Therefore, there may be a substantial need to increase the efficiency ofcontent based switching to decrease latency to meet the designparameters for a particular system.

BRIEF DESCRIPTION OF THE DRAWINGS

The foregoing and a better understanding of the present invention willbecome apparent from the following detailed description of exemplaryembodiments and the claims when read in connection with the accompanyingdrawings, all forming a part of the disclosure of this invention. Whilethe foregoing and following written and illustrated disclosure focuseson disclosing example embodiments of the invention, it should be clearlyunderstood that the same is by way of illustration and example only andis not limited thereto. The spirit and scope of the present invention islimited only by the terms of the appended claims.

The following represents brief descriptions of the drawings, wherein:

FIG. 1 is a block diagram of a network system according to an exampleembodiment.

FIG. 2 is a flow chart illustrating an operation of content basedmessage director according to an example embodiment.

FIG. 3 is a block diagram illustrating a director according to anexample embodiment.

FIG. 4 is a block diagram illustrating a traffic manager according toanother example embodiment.

FIG. 5 is a block diagram illustrating another example operatingenvironment for a content based message director according to an exampleembodiment.

FIG. 6 is a block diagram illustrating a network apparatus according toanother example embodiment.

FIG. 7 is a block diagram illustrating a director 145C according to anexample embodiment.

FIG. 8 is a block flow diagram of the programming logic performed by adirector 145C in accordance with one embodiment of the invention.

FIG. 9 illustrates a data structure for a pattern object in accordancewith one embodiment of the invention.

FIG. 10 provides an example of an XML pattern object in accordance withone embodiment of the invention.

FIG. 11 illustrates a semi-tree structure represented by a documentobject in accordance with one embodiment of the invention.

FIG. 12 is a block flow diagram of a pattern matching algorithm inaccordance with one embodiment of the invention.

FIG. 13 is a block flow diagram to evaluate an XML expression inaccordance with one embodiment of the invention.

FIG. 14 is a block flow diagram to evaluate a path expression inaccordance with one embodiment of the invention.

FIG. 15 is a block flow diagram to evaluate a step expression inaccordance with one embodiment of the invention.

FIG. 16 is a block flow diagram to evaluate a Boolean expression inaccordance with one embodiment of the invention.

DETAILED DESCRIPTION

While increasingly more successful in their roles as store and forwarddata systems, computer networks such as the Internet are experiencingtremendous growth as transaction-based, mission critical businessapplications, Web site owners, and business servers are overwhelmed byexplosive traffic growth. The traditional approach is to buy moreservers and network bandwidth. There is typically no distinction betweenlevels of service, but rather a first-in first-out (FIFO) best effortsapproach has been the default. However, this has resulted in unevenperformance and undifferentiated service. Clearly, there is a need for atechnique to allow service providers to intelligently offer differentservices and different levels of service depending on the circumstances.

Systems are available that allow messages to be routed based uponheaders or header information. For example, in Hypertext TransferProtocol (HTTP), a Post request method includes a request line, a header(or one or more headers) and a body. The request line includes a pointerto a requested resource or program to process the message, such as aUniversal Resource Identifier (URI) or Universal Resource Locator (URL).The HTTP header may also include the type of message, the length of thebody, and the date. There are systems that parse or examine the URL(i.e., the request line) and/or the HTTP header, and then route themessage to a destination node based on the URL and/or header. One suchsystem is described in “The Advantages of F5's HTTP Header LoadBalancing Over Single-Point URL Parsing Solutions.” However, thisapproach is very limited as switching decisions are based only on theHTTP header and/or URL.

Another system, known as BizTalk™, improves slightly on the URL parsingtechnique by providing a system that is compatible with XML-basedmessages.

XML, or eXtensible Markup Language v. 1.0 was adopted by the World WideWeb Consortium (W3C) on Feb. 10, 1998. XML provides a structured syntaxfor data exchange. XML is a markup language, like HTML. Most markuplanguages, like HTML, are fixed markup languages. That is, the fixedmarkup languages (including HTML) include a set of fixed tags forcrafting a document. On the other hand, XML does not define a fixed setof tags, but rather, only defines a syntax or structured format throughwhich users can define their own set of XML tags. There presently are anumber of XML based languages that define their own set of tags usingthe XML syntax. XML has the further advantage because the actual data isseparated from the presentation of the data, in contrast with HTML whichcombines these two items. As a result, XML has the potential to become astandard by which most computers, servers and applications will exchangeor communicate data.

As described in “BizTalk Framework 1.0a Independent DocumentSpecification,” Microsoft Corp., Jan. 7, 2000, BizTalk defines aspecific set of tags (or BizTags) within a message that are used tospecify business document handling (p.7). A Biztalk server usesinformation contained in the Biztags to determine the correcttransport-specific destination address(es). (pp. 9, 11). However, thetags used to mark up business transaction information within the messagebody are determined by the individual implementation. Theseimplementation-specific tags (provided in the content or businesstransaction information of the message body) are not considered BizTags(p. 11).

There are a number of disadvantages to such an approach. The BizTalksystem is very limited because it can route or switch messages basedonly upon header or introductory information, based upon the fixed setof the BizTalk tags. The BizTalk system does not make decisions orroute/switch messages based upon the actual content or businessinformation (e.g., business transaction information) within the messagebody. Moreover, to provide routing or address information, the Biztalksystem requires that messages conform to the required format for thefixed set of Biztags, which is very inflexible and will likely inhibitthe routing or switching of messages provided according to the other XMLbased languages (e.g., CXML, WML). Finally, many processing nodes,application servers and the like are presently burdened with a number ofactivities, such as establishing connections, communicating andprocessing requests for business related information, purchase orders,invoices or other business transactions. Further burdening a server withrouting or switching decisions will require significant applicationprocessing cycles or bandwidth. This may overburden the server ornegatively impact the server's ability to adequately handle businesstransactions.

According to an example embodiment, a network apparatus is providedbetween a network and a plurality of processing nodes (e.g. web servers,application servers, fulfillment servers, XML servers, routers, switchesor other devices). The network apparatus includes a content basedmessage director (e.g., a XML director) to route or direct messagesreceived from the network to one of the processing nodes based upon thecontent of the application data in the message, including businesstransaction information. The application data (including businesstransaction information) may advantageously be provided as a XML basedlanguage.

The application data may be transmitted or received via a cell, packetor other envelope. The application data (such as business transactioninformation) is data to be processed by an application or programrunning on an application server, an XML server (which processes XMLdocuments) or other processing node. Business transaction informationcan include a wide variety of application level information ortransaction information such as purchase orders, invoices, inventoryrequests or replies, stock quotes, stock trade requests orconfirmations, bids, transaction confirmations, shipping/deliveryinstructions or requests, materials or resource usage indications ormeasurements, information related to a transaction and its many details,etc.

According to one or more embodiments, the network apparatus includesmany advantages. First, by examining well beyond a request line (e.g.,URL) and message headers and into the content of the application data(such as the business transaction information) of a message, businessescan provide improved differentiation of services and different servicelevels for received requests and messages based upon the businesstransaction information in the messages. Second, by providing thecontent based message director (or XML director) as a network apparatuslocated between the network and one or more processing nodes orapplication servers, the burden of examining the application data orbusiness transaction information and then switching to a particularprocessing node (e.g., performing XML switching) is offloaded fromapplication servers to a network apparatus (e.g., network appliance,network processor, network server, or the like). Also, the content basedmessage director (or XML director) can receive and switch messages basedupon application data or business transaction information regardless ofthe transport or protocol used to transport the message (e.g., thedirector is transport independent). Finally, the XML director is notlimited to receiving and processing XML data according to a set of fixedtags, but rather, is compatible with any of the XML based languages.

Referring to the Figures in which like numerals indicate like elements,FIG. 1 is a block diagram of a network system according to an exampleembodiment. As shown in FIG. 1, a variety of clients may be coupled orconnected to a data center 135 via a network, such as the Internet 130.The clients, for example, may include a server 110 that includes anapplication program 112, a computer 120 (such as a personal computer orlaptop) that may include a web browser 122 and a wireless device 132,such as a personal digital assistant (PDA) or a wireless (or cellular)telephone. Wireless device 132 may be coupled to the Internet 130 or toa data center 135 via communications links 134 and 136, respectively.Links 134 and 136 each may include one or more of a wireless link (e.g.,cellular or other link) or a wireline link. Each of the clients,including server 110, computer 120 and device 132 can send and receivemessages over the Internet 130 and may use a variety of differentprotocols or transports.

The data center 135 is provided for sending, receiving and processing awide variety of messages, requests, business transactions, purchaseorders, stock quotes or stock trades, and other information. The datacenter 135 includes several processing nodes (e.g., servers), includingserver 150, server 160 and server 170 for handling the various orders,business transactions and other requests. The different servers in datacenter 135 may be allocated to provide different services, or evendifferent levels of services. According to an example embodiment, theclients and the data center 135 exchange business transactioninformation or other information by sending and receiving XML messages(data provided in XML or in a XML based language), or messages basedupon another type of structured syntax for data interchange.

The various servers (e.g., servers 150, 160 and 170) are coupled to atraffic manager 140 via a switch 165. Traffic manager 140 may perform avariety of functions relating to the management of traffic, includingload balancing (e.g., balancing the load of incoming messages orrequests across the available servers according to some policy, such asround-robin, least number of connections, or other load balancingtechnique).

Referring to the clients again in FIG. 1, application program 112 may bea business program or a program for managing inventory, orders or otherbusiness transactions. For example, application program 112 mayautomatically and electronically detect that inventory has decreasedbelow a threshold value and then automatically generate and send apurchase order to a supplier's server at data center 135 to request ashipment of additional supplies or inventory. Thus, server 110 mayinitiate, for example, a business-to-business (B2B) transaction bysending an electronic order to the supplier's remote server located atdata center 135.

As another example, web browser 122 may request web pages, businessinformation or other information from a remote server (e.g., located atdata center 135). Web browser 122, may also send or post purchaseorders, business transactions or other business information to a remoteserver, which may be located at data center 135. Wireless device 132 mayreceive information or data related to purchase orders, businesstransactions, web pages, stock quotes, game scores and the like from oneor more remote servers (such as servers located at data center 135).

According to an embodiment, the server 110, computer 120 and wirelessdevice 132 each may communicate or interchange data with one or moreremote servers (e.g., servers 150, 160 and 170) by sending and receivingXML data (i.e., application data that is encoded or formatted accordingto the XML standard or according to one or more XML based languages).

According to an example embodiment, the traffic manager 140 includes acontent based message director 145 to direct or switch messages to aselected server based upon the content of application data, such asbusiness transaction information (which may be provided as XML data).Traffic manager 140 and/or message director 145 may be hardware or acombination of both hardware and software, and may even be provided onor as part of a network processor. It should be noted that director 145may operate by itself, or as part of a larger network apparatus, such aspart of a traffic manager 140.

According to an example embodiment, because of the advantages of XML,application data can advantageously exchanged between the servers ofdata center 135 and one or more clients or computing nodes by sendingand receiving messages that include application data that is encoded orformatted according to the XML standard. Therefore, according to anembodiment, director 145 may be a XML director because it directs (orroutes/switches) the incoming message to a particular server based uponthe XML data in the message. The XML data preferably complies with theformat or syntax required by the XML standard. A document that uses tagformats (e.g., start tags, end tags) and other syntax (e.g., to markupdata) that complies with the XML standard is considered to be a“well-formed” XML document.

Therefore, in an exemplary embodiment, content based message director145 is a XML director. However, it should be understood that director145 can direct or switch messages having basically any type ofstructured syntax, including any type of markup language.

An advantageous aspect of the embodiment of the traffic manager 140 anddirector 145 shown in FIG. 1 is that the traffic manager 140 and thedirector 145 are located in front of the one or more application serversor processing nodes. By locating the traffic manager 140 and director145 in a computer, server or computing system in front of the processingnodes or servers (as shown in FIG. 1) (e.g., coupled between the network130 and the servers), the traffic management functionality and thefunctionality of the director 145 can be off-loaded from an applicationserver to a separate and/or dedicated network apparatus or networksystem. This can advantageously relieve the processing nodes orapplication servers from this additional processing overhead.

FIG. 2 is a flow chart illustrating an operation of content basedmessage director according to an example embodiment. At block 210, thedirector 145 receives a message. The message may be sent over anytransport or protocol(s), such as Transmission Control Protocol (TCP),File Transfer Protocol (FTP), Simple Mail Transfer Protocol (SMTP),Wireless Application Protocol (WAP, which may be used to send andreceive information with wireless devices), Hypertext Transfer Protocol(HTTP), etc. The general teachings and the operation of the inventionare not dependent upon any particular transport or protocol, but ratherare transport-independent.

A HTTP Post is an example of a message. The format for an HTTP Postmessage (or HTTP request) may be presented as:

-   -   request-line (the URL); identifies a program for processing the        message headers (0 or more)    -   <blank line>    -   body (the application data or the XML data; only for a POST)

Here's an example:

-   -   POST www;acme.com/purchasing/order.cgi HTTP/1.1    -   Content-Type: text/xml    -   Content-Length: 1230    -   User-Agent: Cern-Line Mode/2.15    -   Date: 3/27/00

<XML>   <From>intel.com</From>   <To>bookstore.com</To>   <PurchaseBook>    <ISBN>02013798233</ISBN>     <PurchaseAmount> 98</PurchaseAmount>  </PurchaseBook> </XML>

In this example, the URL (or request line) is provided in a request lineto identify a program or application to process the message. Severalheader lines (Content-type, Content-length, date, etc.) make up an HTTPheader. The application data is provided after the HTTP header, and inthis example is provided as XML data. A start tag <XML>, and </XML>, anend tag, identify the start and end, respectively, of the applicationdata (or XML data). This XML application data is also referred to as aXML document. The XML document includes markup characters (or tags)which describe data, and data characters. As an example, a “To” elementof the above XML document is written as: <To>bookstore.com</To>.Where<To> is a start Tag and </To> is an end tag, which are markupcharacters because they describe the XML data characters(bookstore.com). The business transaction information describes thebusiness transaction (To, From, items purchased, purchase amount,quantity, etc.), and is not included in the URL, the HTTP header, or anyother header (e.g., IP header, TCP header) of the envelope used forsending the message.

While the prior art performed switching based on the request line or URLand/or the HTTP header, the present invention is directed to a techniqueto perform switching at a network apparatus based upon the applicationdata, such as XML data (which includes business transactioninformation).

In this example message, the business transaction information providedwithin the application data as XML data relates to the transaction ordescribes the transaction, including, for example, what kind of businesstransaction (a purchase order or to purchase a book), who it is from andwho it is to, an ISBN number to identify the goods to be purchased andthe amount of the purchase (PurchaseAmount). These are merely examplesof the types of business transaction information in a message upon whichthe director 145 can analyze and make routing or switching decisions forthe message.

At block 215 of FIG. 2, the director 145 (FIG. 1) parses all or part ofthe application data (the XML data in this example) and can check toensure that the XML document or application data is well formed (i.e.,checks to make sure at least a portion of the XML document meets theso-called well-formedness constraints or requirements in the XMLspecification or standard). Parsing generally refers to the process ofcategorizing the characters or XML data that make up the XML document aseither markup (e.g., <To>) or character data (e.g., bookstore.com).

At block 220 of FIG. 2, the application data or XML data (includingmarkup characters and/or character data) is then compared to one or moreconfiguration patterns or queries (which may be stored in the director145) to determine if there is a match. According to an embodiment, theconfiguration patterns may be dynamically changed or updated by a useror by a program or application. For example, a program may detect thefailure of one or more servers and/or detect the response time ofservers, and then update the configuration pattern to account for thesechanges in the network (e.g., redirect certain messages from busyservers to servers which are less busy, or from servers which havefailed to the available servers).

At block 225, if there is a match between the content of the applicationdata (e.g., the business transaction information which may be providedas XML data) of a message and a configuration pattern or query, then thedirector 145 directs or switches the message to the corresponding server(or processing node) in the data center (e.g., directed to the specificserver as indicated by the configuration pattern). If there are multiplematches, the director 145 can just direct the message based to the firstmatch, or a load balancing policy can be used to balance messages amonga group of servers. If there is no match, the message can be directed toa default server or can be blocked. Alternatively, the configurationpattern can also identify a certain pattern for which a message shouldbe blocked from being forwarded. In this respect, the director 145 mayalso act as a filter to selectively pass or forward some messages whileblocking others, based upon the application data.

For example, the director 145 may be configured to direct or switchmessages based on the following configuration patterns or queries:

Server IP address Port XML pattern S1 (e.g., 150) 10.1.1.1 80 To =bookstore.com S2 (e.g., 160) 10.1.1.2 80 To = stockquote.com S3 (e.g.,170) 10.1.1.3 80 To = computerstore.com

Based on the above configuration patterns, the director 145 would directa message to server S1 (having the IP address 10.1.1.1 and port 80) ifthe data for the To element of the business transaction information isbookstore.com. The message will be directed to server S2 (having an IPaddress 10.1.1.2 and port 80) if the data for the To element of thebusiness transaction information is stockquote.com. And, the director145 will direct any messages to server S3 if the data for the To elementof the business transaction information is computerstore.com.

This advantageously allows different types of services (or differentlevels of service) to be provided for messages based on the content ofthe application data (such as the business transaction information) inthe message. In this example, server S1 may be allocated to handlepurchase orders for books sent to bookstore.com. Server S2 may beallocated to process requests for real-time stock quotes, while serverS3 may be allocated to process purchase orders for computers sent tocomputerstore.com.

There are many examples where content based switching based upon thecontent of the application data or business transaction information canbe used to offer different or differentiated services or even differentor differentiated levels of services. As another example, the director145 may be configured to direct or switch messages based on thefollowing configuration patterns or queries:

Server IP address Port XML pattern S1 (e.g., 150) 10.1.1.1 80PurchaseAmount < $100 S2 (e.g., 160) 10.1.1.2 80  $100 < PurchaseAmount< $1000 S3 (e.g., 170) 10.1.1.3 80 $1000 < PurchaseAmount S4 (not shown)10.1.1.4 80 $1000 < PurchaseAmount

In this example, messages for purchase orders are sent to server S1 ifthe purchase amount is less than $100; messages for purchase orders aresent to S2 if the purchase amount is less than $1000 and more than $100;and for the high dollar purchases, the messages for purchase orders forpurchases greater than $1000 can be sent to either of two servers. Inthis fashion, the director 145 (FIG. 1) can direct or route receivedmessages based on the content of the application data or businesstransaction information in the message. This allows web sites orelectronic-businesses (e-businesses) to offer different ordifferentiated levels of services based on the content of theapplication data or transaction information.

In this particular example, two servers (S3 and S4) have been allocatedto handle the highest dollar purchase orders. Thus, by specificallyallocating greater resources (e.g., two or more servers as compared tojust one server) for the higher dollar amount purchases as compared tothe lower dollar purchases, an e-business operating at data center 135can provide a higher level of service for purchase order messages havinga higher dollar purchase amount. In this manner, director 145 can switchor direct messages to another network device or to a specific serverbased upon a wide variety of business transaction information orapplication data.

FIG. 3 is a block diagram illustrating a director according to anexample embodiment. Director 145A includes a block 310 to determinewhether a received message includes XML data.

According to an embodiment, if the message does not include XML data,the message will be passed (e.g., directly) through to the output withlittle if any further processing by director 145A. If the message doesinclude XML data, then the message will be analyzed for making a routingor switching decision as described below.

There are many ways in which block 310 can determine whether a receivedmessage includes XML data. According to one embodiment, certain types offilenames (e.g., invoice.cgi) or filename extensions (e.g., *.cgi),which may typically be provided in the request line, may indicatewhether the message includes XML data. Thus, the filename extension maybe analyzed by block 310 to determine whether the message includes XMLdata. Other information in the message, including other headerinformation or even a particular tag in the application data itself(e.g., the <XML> start tag) can be used to identify whether or not themessage includes XML data.

According to an embodiment, block 310 is optional. However, it isadvantageous to provide block 310 where only a small percentage of theincoming messages include XML data. Without block 310, application datafor all messages will be parsed and compared to the configurationpattern, and a switching decision will be generated. Thus, for thosemessages which do not include XML data (and thus cannot be switched ordirected by director 145A), director 145A will add unnecessary latencyin the message forwarding path in the absence of block 310. On the otherhand, where a significant percentage of the messages received bydirector 145A include XML data, block 310 may be considered unnecessaryand may be omitted (because block 310 would typically add unnecessarylatency in such case).

A parser 312 is coupled to the output of the block 310 to parse theapplication data (or a portion thereof). A configuration memory 314receives and stores one or more configuration patterns or queries. Acontent based switching decision logic 316 receives the output from theparser 312 and compares the configuration patterns to the applicationdata or business transaction information (e.g., including the data andthe markup characters describing the data within the configurationpattern). The content based switching decision logic 316 then outputs aswitching or routing decision for the message on the basis of thecomparison (i.e., on the basis of the business transaction information).The configuration pattern may indicate both a pattern and a processingnode or server to process the message if a pattern is found in themessage.

The output interface 320 then switches or directs the message on thebasis of this decision (e.g., routes the message to the processing nodeor server indicated by the matching configuration pattern). For example,if there is no match, the output interface 320 may filter or block themessage, or may direct or route the message to a default server or apredetermined server in the data center 135. If a match is found, theoutput interface 320 switches or directs the message to the appropriatedestination (e.g., to the appropriate processing node or server withindata center 135).

The configuration pattern may require multiple patterns, or even ahierarchical arrangement of data elements in the application data for aspecific match. For example, the decision logic 316 may receive aconfiguration pattern that specifies:

Server IP address XML pattern S1 (e.g., 150) 10.1.1.1 From = Intel; andPurchaseAmount < $100

In such a case, the switching decision logic 316 would examine theapplication data (or XML data) to first identify a From tag that is setto Intel. Next, it would examine the transaction information to identifya PurchaseAmount that is less than $100. If both of these are found,this indicates a match.

If a match is found between the business transaction information and thepattern, the content based switching logic 316 outputs a switchingdecision to a output interface 320. The switching decision may, forexample, indicate that a match was found and identify the processingnode or server (e.g., by address and port number or other identifier)where the message should be directed.

According to an example embodiment, the decision logic 316 provides anIP address and port number to be used as a new destination IP addressand destination port number for the message. The output interface 320may then translate the destination IP address and port number in thepacket or envelope of the received message from the original destinationIP address and port number (i.e., the IP address and port number of thetraffic manager 140 or director 145A) to the new destination IP addressand port number provided by the decision logic 316. According to anembodiment, the new destination IP address identifies a processing nodeor server (e.g., within data center 135 or elsewhere) and the newdestination port number identifies a program or application on thatprocessing node or server that will receive and process the message.

The message (e.g., with its associated TCP and IP headers translated ormodified to include the new destination address and port number) is thenoutput from the director 145 and traffic manager 140. Switch 165receives the message, and then routes the message to the appropriateprocessing node or server based on the IP address.

According to an example embodiment, a client (e.g., a server 110,computer 120, etc., FIG. 1) that sends a message first establishes aconnection (e.g., a TCP connection), and then sends the message via HTTP(or other transport) to the traffic manager 140 and/or director 145A.The director 145A then parses the XML data, and makes a switchingdecision based on the business transaction information in the message ascompared to one or more configuration patterns. A new connection is thenestablished between the director 145A or traffic manager 140 and thedestination processing node or server. The message is then directed orrouted from director 145A to the specified node or server.

FIG. 4 is a block diagram illustrating a traffic manager according toanother example embodiment. Traffic manager 140 includes a securityaccelerator 415 for encrypting outgoing messages and/or decryptingincoming messages received from the network. According to an embodiment,the security accelerator 415 is a Secure Sockets Layer (SSL)accelerator, available from Intel Corporation. The security accelerator415 allows the security related tasks such as encryption and/ordecryption to be off-loaded from the application server to theaccelerator 415 of the traffic manager 140.

Traffic manager 140 also includes a director 145B and a broker 410. Adecrypted message is received by broker 410 from security accelerator415. According to an example embodiment, broker 410 operates as both anoutput interface (similar to output interface 320) and a load balancerto balance or adjust the traffic between one or more of servers orprocessing nodes within the data center 135.

Director 145B is similar to director 145A but may not include block 310and/or the output interface 320 of director 145A (as these functions maybe provided by the broker 410 in FIG. 4). Parser 312 (which may beoptional) parses the XML data. The content based switching decisionlogic 316 compares the configuration patterns to the application data orbusiness transaction information in the message and then outputs aswitching decision to broker 410 for the message on the basis of thecomparison. The switching decision output to broker 410 may, forexample, identify the IP address and port number of the selectedprocessing node or server or application server that should receive themessage.

Broker 410 performs address translation on the header(s) for themessage. The address translation performed by broker 410 includes adestination address and destination port translation and an optionalsource address and source port translation. The destination address andport translation may be performed by translating the originaldestination IP address and port number of the received message (whichmay identify the broker 410) to the IP address and port number of thespecified processing node or server (or of the specified server resourceor program). In addition, the broker may also translate the source IPaddress and port number in the packet or envelope from the originatingclient 's address and port number to the IP address and port number ofthe broker 410 (or of the traffic manager 140). The message (includingone or more translated addresses) is then output from broker 410. Switch165 (FIG. 1) receives the message and forwards the message to theappropriate server based on the destination address in the message.According to one embodiment, it is not necessary to actually translatethe source IP address and port number if all return messages or repliesfrom the processing node or server are routed through the broker 410.

Broker 410 also translates destination addresses for return messages orreplies from the processing node or server sent to the client, tosubstitute the IP address and port number of the client as thedestination address and port for the return message or reply. Thus, thebroker 410 may operate as a gateway or output interface between theclient (FIG. 1) and the processing node or server, by performingdestination address translation prior to routing or forwarding themessage, and performing a similar translation for return or replymessages sent from the processing node or server back to the client.

According to an example embodiment, broker 410 and security accelerator415 may be provided, for example, as an Intel® NetStructure™ 7180E-Commerce Director. Alternatively, the broker 410 may be provided as anIntel® NetStructure™ 7170 Traffic Director. Both are available fromIntel Corporation, Santa Clara Calif. As a result, broker 410 mayperform additional functions including load balancing according to aload balancing policy or algorithm to adjust the load on each server inthe data center.

The director 145 (or 145A or B), the security accelerator 415 and thebroker 410 (or load balancer) may be provided in a network apparatus indifferent combinations, depending on the circumstances. FIG. 6 is ablock diagram illustrating a network apparatus according to anotherexample embodiment. For example, each of the director 145, securityaccelerator 415 or load balancer (or broker 410) may be provided byitself. Alternatively, all three of the security accelerator 415, an XMLdirector 145 and a load balancer may be provided within a networkapparatus or traffic manager, as shown in FIG. 6. Or, the XML director145 may be combined with just one of either a security accelerator 415or a load balancer (broker 410). Other combinations are possible.

FIG. 5 is a block diagram illustrating another example operatingenvironment for a content based message director 145 according to anexample embodiment. As noted above, XML does not define a fixed set oftags, but rather, only defines a syntax or structured format throughwhich users can define their own set of tags or their own XML basedlanguage. In fact there are many different XML-based languages in use,each having a unique set of tags that define what elements should beprovided to comply with that XML language.

An XML language is defined by a validation template (indicating theproper form for the tags), known in XML as a Document Type Definition(DTD). For example, BizTalk by Microsoft Corp. includes one set of XMLtags; CXML by Ariba Corp. includes its own set of tags; CBL by CommerceOne includes another set of XML tags; While WML (Wireless MarkupLanguage) defines yet another set of XML tags for the communication orinterchange of data to and from a wireless device. Each of theseXML-based languages includes a different or unique set of tags, and thuseach is generally incompatible with the other languages. For example, aclient sending data using CXML will not be able to properly communicatewith a processing node or server that expects to receive data onlyprovided according to WML.

According to an advantageous aspect of the present invention, director145 can receive an XML message, compare the application data or businesstransaction information to the configuration pattern, and then direct orroute the message (or make switching or routing decisions) to anappropriate processing node or server regardless of the type ofXML-based language used by the message. Once the director 145 isconfigured to detect or recognize one or more specific tags andcorresponding data (e.g., PurchaseAmount >$100), the director 145 candirect or route the message based on the content of the application data(e.g., based on the business transaction information provided as XMLdata), regardless of the type of XML-based language that is used by themessage.

As shown in FIG. 5, Director 145 is coupled to switch 165. There arethree sets of servers (or data centers) coupled to the switch 165,including: a set of BizTalk servers 510 (including servers 1 and 2)which communicate data using an XML based language known as BizTalk; aset of Ariba servers 515 (including servers 3 and 4) which communicatedata using the XML based language known as CXML; and a set of wirelessservers 520 (including servers 5 and 6) which communicate data usingonly the XML based language known as Wireless Markup Language or WML.These are merely provided as examples. Thus, the director 145 canoperate as a gateway or interface, receiving messages from a variety ofdifferent clients using a variety of different XML based languages, andthen directing or routing the messages to the appropriate processingnode or servers.

FIG. 7 is a block diagram illustrating a director 145C according to anexample embodiment. Director 145C may comprise a document objectgenerator 702, a pattern object generator 706 and a content basedswitching decision logic 710. Document object generator 702 may includea document parser 704. Pattern object generator 706 may include apattern parser 708. In this embodiment, director 145C does not include ablock 310 to determine whether a received message includes XML data,although director 145C may include block 310 and still fall within thescope of the invention.

As stated previously, director 145C may perform pattern matching againstany documents having a structured syntax, such as an XML document.Director 145C accepts and XML document and one or more XML patterns andtheir associated user data. Director 145C matches the XML documentagainst the list of XML patterns. In this embodiment of the invention,director 145C matches the XML document against one pattern at a time,although the matching may be performed against multiple patterns inparallel with the appropriate hardware resources. If a match is found,the user data associated with the matched XML pattern and/or the matchedXML pattern are returned. The user data associated with an XML patternmay be an opaque object to director 145C and may be used to determinewhat action(s) are to be performed upon a match on a specific XMLpattern, as discussed previously. The engine may be alternativelyinvoked with matching against all XML patterns specified. It is worthyto note that although some embodiments of the invention may be describedusing XML, it can be appreciated that any structured syntax may beimplemented and still fall within the scope of the invention.

Director 145C may receive a document such as an XML document, althoughthe embodiments of the invention are not limited in this context. TheXML document may be passed to document object generator 702. Documentobject generator 702 may include a document parser 704 to parse the XMLdocument into an XML object. An XML object is a data structure used torepresent a logical tree of the XML document, as discussed in moredetail with reference to FIG. 11. In one embodiment of the invention,only entities desired for the pattern matching process are stored in thedata structure. Data on entities such as DTD, comments and processinginstructions (PI) are not stored.

Well-formedness of the XML document may be implicitly checked whenparsed by an XML parser (e.g., document parser 704). In one embodimentof the invention, an XML document that is not well-formed may berejected. Various actions may be taken with rejected documents,including switching to a default server, dropping from the system,sending a message to the document owner informing them of the documentstatus, and so forth.

Director 145C may also receive one or more patterns. The patterns may bepassed to pattern object generator 706. Pattern object generator 706 mayvalidate the syntax of the patterns, and create a pattern object foreach pattern, as discussed in more detail below with reference to FIGS.9 and 10. Pattern object generator 706 may include pattern parser 708 toparse a pattern in real-time. Alternatively, pre-parsed patterns may bestored in a memory (e.g., configuration memory 314) and made availableto content based switching logic 710 to reduce the overhead of patternparsing.

Director 145C may pass the document object and the pattern object(s)into content based switching decision logic 710. Content based switchingdecision logic 710 may perform pattern matching to determine whether adocument matches one or more patterns. In one embodiment of theinvention, director 145C is configured to traverse a document only untilone or more patterns are matched to accelerate the pattern matchingprocess. Alternatively, director 145C may traverse the entire documentin accordance with a particular design goal. If a match is found, theuser data associated with the matched XML pattern and/or the matched XMLpattern are returned. The user data associated with an XML pattern maybe an opaque object to director 145C and may be used to determine whataction(s) are to be performed upon a match on a specific XML pattern.Examples of possible actions include those described previously as wellas others.

FIG. 8 is a block flow diagram of the programming logic performed by adirector 145C in accordance with one embodiment of the invention.Although the programming logic may be presented here in a particularsequence, it can be appreciated that the programming logic may beperformed in any sequence and still fall within the scope of theinvention.

FIG. 8 illustrates a programming logic 800. Programming logic 800 mayinclude receiving a message having application data with transactioninformation at block 802. A document object may be created using thetransaction information at block 804. A pattern object representingpattern information may be received at block 806. The document objectmay be compared with the pattern object at block 808. The message may bedirected to one of a plurality of processing nodes at block 810 inaccordance with the results of the comparison at block 808.

FIG. 9 illustrates a data structure for a pattern object in accordancewith one embodiment of the invention. A pattern object may be a datastructure that represents a pattern, such as an XML pattern. Forexample, an XML pattern may be represented by a number ofsub-expressions, each represented by a separate XML expression object.FIG. 9 illustrates a set of XML expression objects, each containing anexpression type and expression data. In one embodiment of the invention,a sub-expression may be referred to as a “PATH” expression thatcomprises one or more “STEPS,” with each STEP representing a step withina PATH pattern.

As shown in FIG. 9, a pattern object data structure 900 may compriseblocks 902 to 918, with each block representing a predefined set ofdata. Block 902 may represent an expression block having a field forexpression data. Block 904 may represent a Boolean expression, havingfields for an operator, a left operand and a right operand. Block 906may represent a PATH sub-expression, having fields for a number of stepsand the step names and/or pointers. Block 910 may represent a functionexpression, having fields for a function name, a returned value, anumber of arguments, and the argument(s). Block 912 may represent anelement, having a field for an element name. Block 914 may represent anattribute, having a field for an attribute name. Block 916 may representtext, having fields for a value type and a value. Block 918 mayrepresent default information. It can be appreciated that the patternobject data structure is not limited to these particular blocks orfields.

FIG. 10 provides an example of an XML pattern object in accordance withone embodiment of the invention. Assume that pattern object generator706 receives a new configuration pattern. The new configuration patternis designed to find matches for employees having a last name of “Smith”and having an initial. Pattern object generator 706 would pass thepattern information to pattern parser 708 to parse the pattern inaccordance with a pattern object data structure as described withreference to FIG. 9. Pattern parser 708 may receive a string ofinformation written in a particular syntax or format, such as “employeelast name=smith.” Pattern parser 708 would parse the information stringfor individual elements, and place those elements in the appropriateblock within the pattern object data structure. For example, patternparser 708 may interpret the information string “employee lastname=smith” as a PATH sub-expression 1002 having two steps 1004 and1010. Step 1004 may represent a DESCENDANT_OP, having the element fieldset to “employee” and the filter field set to a NULL value (e.g., 0).Step 1010 may represent a CHILD_OP, having the element field set to“name” and the filter field set to a Boolean expression block 1014. Thedesignators DESCENDANT_OP and CHILD_OP may indicate the order in whichthe XML pattern data structure is to be traversed during the patternmatching process. Boolean expression block 1014 may represent an AND_OP,with the left operand set to a comparison expression block 1016, and theright operand set to an attribute expression block 1022. Comparisonexpression block 1016 may represent an EQUAL_OP, with the left operandset to an attribute block 1018, and the right operand set to a textblock 1020. Attribute block 1018 may have the attribute field set to“lastname.” Text block 1020 may have the text field set to “smith” andthe value “string_value” set to a value representing the length for thetext field.

By having a configuration pattern parsed into a predefined patternobject data structure, content based switching decision logic 710 mayuse a pattern matching algorithm that is optimized to search for aparticular set of pattern information within a document. Similarly, byhaving the relevant information from a document parsed into a documentdata structure, content based switching decision logic 710 may optimizematching the pattern information contained in the pattern object datastructure with the document data stored in the predefined documentobject data structure.

Director 145C may receive a document (e.g., an XML document), and passthe document to document object generator 702. Document object generator702 may pass the document to document parser 704 to parse the documentinto a document object (e.g., an XML document object). Document parser704 may parse a predefined element node in the XML document as an entryin an XML document object. An element node as defined herein may be ablock of information within a document, as determined according to aparticular syntax or structure of the document.

The XML document object may have a data structure represented as a tablesimilar to Table 1, with each row containing information about eachelement node. The XML document object may represent a logical semi-treestructure of the XML document tree as shown in TABLE 1 as follows:

TABLE 1 Level Element Attribute List Text Child Sibling Level ElementAttribute List Text Child Sibling . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

For a complete tree, each parent typically contains links to all itsimmediate children. In one embodiment of the invention, the documentobject contains only a link to the first child, with each childcontaining a link to its next sibling. To access all children,therefore, a parent may follow the child link, and then the sibling linkof the child. This may be illustrated in FIG. 11.

FIG. 11 illustrates a semi-tree structure represented by a documentobject in accordance with one embodiment of the invention. FIG. 11illustrates a logical semi-tree structure 1100 having elements 1102,1104, 1106, 1108, 1110, 1112, 1114, 1116, 1118, 1120 and 1122. Totraverse structure 1100, a program may start with 1102 and follow therelevant pointers to the desired element. For example, to retrieveelement 1112, a program may traverse elements 1102, 1105, 1108 and 1110.By way of contrast, a normal tree structure may have a pointer forelement 1104 directly to element 1112. Although this may potentiallydecrease search times, it also may increase the size of the datastructure thereby increasing memory and processing requirements.

As discussed with reference to FIG. 8, the document object from documentobject generator 702 and the pattern object from pattern objectgenerator 706 may both be passed to content based switching decisionlogic 710. Content based switching decision logic 710 may compare thedocument object with the pattern object to find a match(es). Thecomparison may be made using a pattern-matching algorithm optimized touse document objects and pattern objects. One embodiment of theinvention utilizes a pattern-matching algorithm as described below,although the embodiments of the invention are not limited in thiscontext.

FIG. 12 is a block flow diagram of a pattern matching algorithm inaccordance with one embodiment of the invention. FIG. 12 illustrates aprogramming logic 1200 that may be implemented, for example, as part ofcontent based switching decision logic 710. An XML document object isgenerated at block 1202. An XML pattern object is generated at block1204. The XML pattern object is designated as the current XML pattern atblock 1206. The current XML expression is designated as the top levelexpression in the XML pattern object at block 1208. The current XMLexpression is evaluated at block 1210. A determination is made whetherthere is a match of the current XML expression by the XML documentobject at block 1212. If there is a match at block 1212, a determinationis made as to whether all the XML pattern objects must be matched atblock 1214. If all the XML pattern objects do not need to be matched atblock 1214, the match result is returned at block 1216. If all the XMLpattern objects must be matched at block 1214, a determination is madewhether there are any more XML pattern objects at block 1218. If thereare no more XML pattern objects to be matched at block 1218, the matchresult is returned at block 1216. If there are more XML pattern objectsto be matched at block 1218, the next pattern object is retrieved anddesignated the current XML pattern object at block 1220, and control ispassed to block 1208.

FIG. 13 is a block flow diagram to evaluate an XML expression inaccordance with one embodiment of the invention. FIG. 13 illustrates aprogramming logic 1300 that may be implemented as part of block 1210discussed with reference to FIG. 12. A determination is made as to theexpression type at block 1304.

If the expression type is an elemental expression, a determination ismade as to whether the element is in the child node of the context nodeat block 1318. If the element is in the child node of the context nodeat block 1318, a match is returned at block 1320. If the element is notin the child node of the context node at block 1318, a no match resultis returned at block 1324.

If the expression type is a Boolean expression, the Boolean expressionis evaluated at block 1306. A determination is made as to whether amatch has occurred with the XML document object at block 1316. If amatch has occurred at block 1316, a match is returned at block 1320. Ifa match has not occurred at block 1316, a no match result is returned atblock 1324.

If the expression type is a comparison expression, the comparisonexpression is evaluated at block 1308. A determination is made as towhether a match has occurred with the XML document object at block 1316.If a match has occurred at block 1316, a match is returned at block1320. If a match has not occurred at block 1316, a no match result isreturned at block 1324.

If the expression type is a path expression, the path expression isevaluated at block 1310. A determination is made as to whether a matchhas occurred with the XML document object at block 1316. If a match hasoccurred at block 1316, a match is returned at block 1320. If a matchhas not occurred at block 1316, a no match result is returned at block1324.

If the expression type is a step expression, the step expression isevaluated at block 1312. A determination is made as to whether a matchhas occurred with the XML document object at block 1316. If a match hasoccurred at block 1316, a match is returned at block 1320. If a matchhas not occurred at block 1316, a no match result is returned at block1324.

If the expression type is a function expression, the function expressionis evaluated at block 1314. A determination is made as to whether amatch has occurred with the XML document object at block 1316. If amatch has occurred at block 1316, a match is returned at block 1320. Ifa match has not occurred at block 1316, a no match result is returned atblock 1324.

If the expression type is an attribute expression, a determination ismade as to whether the attribute is in the context node at block 1322.If the attribute expression is in the context node at block 1322, amatch is returned at block 1320. If the attribute expression is not inthe context node at block 1322, a no match result is returned at block1324.

FIG. 14 is a block flow diagram to evaluate a path expression inaccordance with one embodiment of the invention. FIG. 14 illustrates aprogramming logic 1400 that may be implemented as part of block 1310 asdescribed with reference to FIG. 13. The path expression is evaluated atblock 1402. The first step is designated as the current step, the rootnode is designated as the context node, and the root node is designatedas the current node at block 1404. A step expression of the pathexpression is evaluated at block 1406.

A determination is made as to whether the step expression matches theXML document object at block 1408. If there is a match at block 1408, adetermination is made as to whether the path expression has any morestep expressions at block 1410. If there are no more step expressions atblock 1410, a match result is returned at block 1412. If there are morestep expressions at block 1410, the next step is designated as thecurrent step and the current node is designated as the context node atblock 1414, and control is passed to block 1406.

If there is no match at block 1408, a determination is made as towhether the step expression is a “child_OP” at block 1416. If the stepexpression is a “child_OP” at block 1416, a no match result is returnedat block 1428. If the step expression is not a “child_OP” at block 1416,a determination is made as to whether the current node has any childnodes at block 1418. If there is a child node at block 1418, the childnode is designated as the current node at block 1420 and control isreturned to block 1406. If there is no child node at block 1418, then adetermination is made as to whether the current node has any siblings atblock 1422. If the current node has a sibling at block 1422, the siblingnode is designated as the current node at block 1424, and control isreturned to block 1406. If the current node does not have a sibling atblock 1422, a determination is made as to whether the context node isthe same as the current node at block 1426. If the context node is thesame as the current node at block 1426, a no match result is returned atblock 1428. If the context node is not the same as the current node atblock 1426, a sibling of the parent node is designated as the currentnode at block 1430, and control is passed to block 1406.

FIG. 15 is a block flow diagram to evaluate a step expression inaccordance with one embodiment of the invention. FIG. 15 illustrates aprogramming logic 1500 that may be implemented as part of block 1312described with reference to FIG. 13, and/or block 1406 described withreference to FIG. 14. The step expression is evaluated at block 1502. Adetermination is made as to whether the step expression matches thecurrent node at block 1504. If the step expression does not match thecurrent node at block 1504, a no match result is returned at block 1506.If the step expression matches the current node at block 1504, adetermination is made as to whether the step expression contains afilter at block 1508. If the step expression does not contain a filterat block 1508, a match result is returned at block 1514. If the stepexpression does contain a filter at block 1508, the current node isdesignated as the context node and the filter expression is evaluated atblock 1510. A determination is made as to whether the filter expressionis matched at block 1512. If the filter expression is matched at block1512, a match result is returned at block 1514, otherwise a no matchresult is returned at block 1506.

FIG. 16 is a block flow diagram to evaluate a Boolean expression inaccordance with one embodiment of the invention. FIG. 16 illustrates aprogramming logic 1600 that may be implemented as part of block 1306 asdescribed with reference to FIG. 13. A Boolean expression is evaluatedat block 1602. The left expression is evaluated at block 1604. Adetermination is made as to whether the left expression is matched atblock 1606. If the left expression is not matched at block 1606, adetermination is made as to whether the Boolean expression is an “AND”expression at block 1608. If the Boolean expression is an “AND”expression at block 1608, a no match result is returned at block 1610.If the Boolean expression is not an “AND” expression at block 1608, theright expression is evaluated at block 1614. If the left expression ismatched at block 1606, a determination is made as to whether the Booleanexpression is an “AND” expression at block 1612. If the Booleanexpression is an “AND” expression at block 1612, the right expression isevaluated at block 1614. A determination is made as to whether the rightexpression is matched at block 1616. If the right expression is notmatched at block 1616, a no match result is returned at block 1610,otherwise a match result is returned at block 1618.

Several embodiments of the present invention are specificallyillustrated and/or described herein. However, it will be appreciatedthat modifications and variations of the present invention are coveredby the above teachings and within the purview of the appended claimswithout departing from the spirit and intended scope of the invention.

1. A network apparatus, comprising: a document parser to parse adocument having transaction information and to create a document objectfrom said transaction information; a pattern parser to parse patterninformation of a pattern for one or more elements according to apredefined pattern object data structure and to place said elements inappropriate blocks within said pattern object data structure; a patternobject generator to receive said pattern information of a pattern and tocreate a pattern object from said pattern information; and content basedswitching decision logic to make a switching decision for a messagebased upon a comparison of said document object with said patternobject, said pattern object contains at least one expression, and saidcontent based switching logic evaluates said at least one expression fora match with said document object.
 2. The network apparatus of claim 1,further comprising a document object generator to receive said documenthaving transaction information.
 3. The network apparatus of claim 1,wherein said transaction information and said pattern informationrepresent XML information.
 4. The network apparatus of claim 1, whereinsaid document object represents a logical tree of said transactioninformation.
 5. The network apparatus of claim 1, further comprising anoutput interface to receive a message from a network and to receive saidswitching decision from said content based switching decision logic,said output interface to route or switch the received message to one ofa plurality of processing nodes to process said message based upon saidswitching decision.
 6. The network apparatus of claim 1, wherein saidpattern object comprises at least one sub-expression represented by anexpression object.
 7. The network apparatus of claim 1, wherein saidexpression comprises an expression type and expression data.
 8. A systemcomprising: a network apparatus comprising a content based messagedirector coupled to a wireless telephone, said content based messagedirector comprising: a document parser to parse said document and createa document object from said transaction information; a pattern parser toparse pattern information of a pattern for one or more elementsaccording to a predefined pattern object data structure and to placesaid elements in appropriate blocks within said pattern object datastructure; a pattern object generator to receive said patterninformation of a pattern and to create a pattern object from saidpattern information; and content based switching decision logic to makea switching decision for a message based upon a comparison of saiddocument object with said pattern object, said pattern object containsat least one expression, and said content based switching logicevaluates said at least one expression for a match with said documentobject.
 9. The system of claim 8, further comprising a document objectgenerator to receive said document having transaction information. 10.The system of claim 8, further comprising an output interface to receivea message from a network and to receive said switching decision fromsaid content based switching decision logic, said output interface toroute or switch the received message to one of a plurality of processingnodes to process said message based upon said switching decision. 11.The system of claim 8, wherein said transaction information and saidpattern information represent XML information.
 12. A method comprising:parsing, by a document parser, a document having transactioninformation; creating, by said document parser, a document object usingsaid transaction information; parsing, by a pattern parser, patterninformation of a pattern for one or more elements according to apredefined pattern object data structure; placing said elements inappropriate blocks within said pattern object data structure; creating apattern object from said pattern information; making a switchingdecision, using content based switching decision logic, for a messagebased upon a comparison of said document object with said patternobject; and evaluating, using said content based switching logic, atleast one expression contained in said pattern object for a match withsaid document object.
 13. The method of claim 12, further comprisingreceiving a message from a network, receiving said switching decision,and routing or switching the received message to one of a plurality ofprocessing nodes to process said message based upon said switchingdecision.
 14. The method of claim 12, wherein said transactioninformation and said pattern information represent XML information. 15.An article comprising: a storage medium; said storage medium includingstored instructions that, when executed by a processor, result inparsing a document having transaction information, creating a documentobject using said transaction information, parsing pattern informationof a pattern for one or more elements according to a predefined patternobject data structure, placing said elements in appropriate blockswithin said pattern object data structure, creating a pattern objectfrom said pattern information, making a switching decision for a messagebased upon a comparison of said document object with said patternobject, and evaluating at least one expression contained in said patternobject for a match with said document object.
 16. The article of claim15, wherein the stored instructions, when executed by a processor,further result in receiving a message from a network, receiving saidswitching decision, and routing or switching the received message to oneof a plurality of processing nodes to process said message based uponsaid switching decision.
 17. The article of claim 15, wherein saidtransaction information and said pattern information represent XMLinformation.